/* 
 * File:   TupleK.h
 * Author: hamed
 *
 * Created on October 29, 2010, 1:56 PM
 */

#ifndef _TUPLEK_H
#define	_TUPLEK_H

#include "LogicValue.h"
#include <iostream>

using namespace std;

class TupleK {
public:
    TupleK(int k);
    virtual ~TupleK();
    LogicValue GetValueAt(int index) const;
    unsigned long long int getValueAsInt();
    void setTuple(TupleK* t);
    void setTuple(int value);
    void setTuple(LogicValue value);
    void SetValueAt(int index, LogicValue value);
//    bool isValid();
    bool isAllOne();
    bool isAllZero();
    bool containsLogic();
    void print();
    char* getFunction();
    int GetTupleLength() const;
    bool operator== (TupleK* t);
    bool operator!= (TupleK t);
    bool operator%= (TupleK t);
    TupleK* operator>> (int shr);
    TupleK operator<< (int shl);
    TupleK* operator&= (TupleK t);
private:
    LogicValue* tuple;
    int tupleLength;
    bool allOne;
    bool allZero;
    bool tupleUpdated;
};

#endif	/* _TUPLEK_H */

